package com.ty.xiaoyu.mapper;

import com.ty.xiaoyu.entity.Reply;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReplyMapper {

    // 根据主贴id获取回帖
    List<Reply> queryReplyListByTopicId(@Param("topicId") String topicId);

    // 新增回帖
    Integer insertReply(@Param("reply") Reply reply);

    // 根据id获取回帖
    Reply queryReplyById(@Param("replyId") String replyId);

    // 根据topicId获取reply数量
    Integer queryReplyCountByTopicId(@Param("topicId") String topicId);
}
